//------------------------------------------------------------------------------//
// 
// MODULE   : playerclnt.cpp
// 
// PURPOSE  : CPlayerClnt - Implementation
// 
// CREATED  : 07/15/2002
// 
// (c) 2002 LithTech, Inc.  All Rights Reserved
// 
//------------------------------------------------------------------------------//

#include "playerclnt.h"

#include <iltclient.h>
#include <ltobjectcreate.h>
#include "clientinterfaces.h"
#include <iltcommon.h>

//----------------------------------------------------------------------------
// void CPlayerClnt::SetHObject(HLOCALOBJ hObj)
//
//-----------------------------------------------------------------------------



void player_client::set_rotation(const LTRotation& rot) {
    assert(m_hObject) ;
    g_pLTClient->SetObjectRotation(m_hObject, &rot);
}


LTVector player_client::position() const {
    assert(m_hObject) ;
    LTVector pos ;
    g_pLTClient->GetObjectPos(m_hObject, &pos) ;
    return pos ;
}

void player_client::show() {
    assert(m_hObject) ;
    g_pLTCCommon->SetObjectFlags(m_hObject, OFT_Flags, FLAG_VISIBLE, FLAG_VISIBLE);
}

void player_client::hide() {
    assert(m_hObject) ;
    g_pLTCCommon->SetObjectFlags(m_hObject, OFT_Flags, FLAG_VISIBLE, NULL);
}
player_client::~player_client() {
    if(m_hObject) {
        g_pLTClient->RemoveObject(m_hObject) ;
        m_hObject = 0 ;
    }
}
LTRotation player_client::rotation() const {
    assert(m_hObject) ;
    LTRotation rot ;
    g_pLTClient->GetObjectRotation(m_hObject, &rot) ;
    return rot ;
}

void player_client::set_position(const LTVector& pos) {
    assert(m_hObject) ;
    g_pLTClient->SetObjectPos(m_hObject, &pos) ;
}
//----------------------------------------------------------------------------
// void CPlayerClnt::SpecialEffectMessage(ILTMessage_Read *pMessage)
//
//-----------------------------------------------------------------------------
void player_client::deal_special_effect_message(ILTMessage_Read *pMessage) {
	// Nothing to read currently
}
